#include <string.h>
#include <stdio.h>
/* reversing string using pointers */
void strrev(char *);
int main()
{
    char p[100];
    printf("enter a string\n");
    fgets(p,100,stdin); 
    strrev(p);
    puts(p);   
    return 0;
}

void strrev(char *q)
{
char t;    
char *s = q +(strlen(q) -2);
while(s != q)
{
    t = *q;
    *q = *s;
    *s = t;
    q++;
    s--;

}

}



        

 
